﻿
using getab;

namespace 最小二乘法
{
    internal class Program
    {
        static void Main(string[] args) 
        {
         getpoints.getpoint();
         getaandb.getab();
            const double True = 17734062645371;
         double pred =getaandb.prediction(2021);
         Console.WriteLine($"实际的2021年GDP为:{True} ");
         Console.WriteLine($"预测的2021年GDP为：{pred}");
        Console.WriteLine($"误差是：{Error(True,pred)}");
        }
        static double Error(double m,double n)
        {double error = (m -n)/m;
        error = Math.Abs(error);
         return error;
        }
    }
}
